#include "IIC_HAL_QG.h"
#include "TPM_HAL_QG.h"

#define IIC_TX_BUFFER_SIZE 11

#define VSCI_TX_BUFFER_SIZE	11

#define VSCI_TX_IDLE 0x80
#define VSCI_TX_BUSY 0x40

#define VSCI_TX_PIN		PTAD_PTAD2	
#define VSCI_RX_PIN		PTAD_PTAD3

#define VSCI_TX_PIN_DD	PTADD_PTADD2
#define VSCI_RX_PIN_DD	PTADD_PTADD3	

#define VSCI_GPS_DATA_REQUEST 0xAF
#define VSCI_GPS_HOME_REQUEST 0x50

#define VSCI_GPS_HOME_FEEDBACK 0xE3

#define VSCI_BAUD_RATE 	50000

#define VSCI_TIMER_CLOCK	8000000

#define VSCI_TIMER_DELAY_VALUE	(uint16)(VSCI_TIMER_CLOCK / VSCI_BAUD_RATE)
#define VSCI_TIMER_DELAY_START_BIT (uint16)(VSCI_TIMER_DELAY_VALUE - 32)
#define VSCI_TIMER_HALF_DELAY	(uint16)(VSCI_TIMER_DELAY_VALUE / 2)	 

void vfnComm_BuildIICPacket (void);

void vfnIIC_Init (void);

void vfnIIC_SlaveReadWrite (void);

void vfnIIC_SlaveReadStore (void) ;

void vfnComm_BuildIICPacket (void);

uint8 u8VSCI_ReadByte (void);

void vfnVSCI_SendByte (uint8 u8byte);

void vfnVSCI_Configure (void);

void vfnComm_BuildVSCIPacket (void);
